﻿using System.ComponentModel;

namespace Borg
{
    public enum Orientation
    {
        Stacked,
        SideBySide
    }

    public class PanelInfo : INotifyPropertyChanged
    {
        private string _name;
        private Orientation _orientation;

        public event PropertyChangedEventHandler PropertyChanged;

        public PanelInfo(string name)
        {
            _name = name;
        }

        public PanelInfo(string name, Orientation orientation)
            : this(name)
        {
            _orientation = orientation;
        }

        protected virtual void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        public string Name
        {
            get { return _name; }
            set
            {
                if (_name == value)
                    return;

                _name = value;
                OnPropertyChanged("Name");
            }
        }

        public Orientation Orientation
        {
            get { return _orientation; }
            set
            {
                if (_orientation == value)
                    return;

                _orientation = value;
                OnPropertyChanged("Orientation");
            }
        }
    }
}

